package day_15;

import java.util.Scanner;

public class ques1 {
    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);

        while(scan.hasNextInt()){
            int n=scan.nextInt();
            int sum=0;
            while(n!=0){
                if((n&1)==1){
                    sum++;
                }
                n=n>>1;
            }

            System.out.println(sum);
        }
    }
}
